package com.sunplus.system.registration.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sunplus.system.registration.mapper.PortalDictionariesMapper;
import com.sunplus.system.registration.domain.PortalDictionaries;
import com.sunplus.system.registration.service.IPortalDictionariesService;

/**
 * 字典码Service业务层处理
 * 
 * @author sunplus
 * @date 2021-03-25
 */
@Service
public class PortalDictionariesServiceImpl implements IPortalDictionariesService 
{
    @Autowired
    private PortalDictionariesMapper portalDictionariesMapper;

    /**
     * 查询字典码
     * 
     * @param pid 字典码ID
     * @return 字典码
     */
    @Override
    public PortalDictionaries selectPortalDictionariesById(String pid)
    {
        return portalDictionariesMapper.selectPortalDictionariesById(pid);
    }

    /**
     * 查询字典码列表
     * 
     * @param portalDictionaries 字典码
     * @return 字典码
     */
    @Override
    public List<PortalDictionaries> findListBySupCode(PortalDictionaries portalDictionaries)
    {
        return portalDictionariesMapper.selectPortalDictionariesList(portalDictionaries);
    }

    @Override
    public List<PortalDictionaries> findListBySupCode(String supCode) {
        return portalDictionariesMapper.findListBySupCode(supCode);
    }

    /**
     * 新增字典码
     * 
     * @param portalDictionaries 字典码
     * @return 结果
     */
    @Override
    public int insertPortalDictionaries(PortalDictionaries portalDictionaries)
    {
        return portalDictionariesMapper.insertPortalDictionaries(portalDictionaries);
    }

    /**
     * 修改字典码
     * 
     * @param portalDictionaries 字典码
     * @return 结果
     */
    @Override
    public int updatePortalDictionaries(PortalDictionaries portalDictionaries)
    {
        return portalDictionariesMapper.updatePortalDictionaries(portalDictionaries);
    }

    /**
     * 批量删除字典码
     * 
     * @param pids 需要删除的字典码ID
     * @return 结果
     */
    @Override
    public int deletePortalDictionariesByIds(String[] pids)
    {
        return portalDictionariesMapper.deletePortalDictionariesByIds(pids);
    }

    /**
     * 删除字典码信息
     * 
     * @param pid 字典码ID
     * @return 结果
     */
    @Override
    public int deletePortalDictionariesById(String pid)
    {
        return portalDictionariesMapper.deletePortalDictionariesById(pid);
    }
}
